The superior ease-of-use characteristics of electronic spreadsheets are well-known, especially in the field of office automation. The use of electronic spreadsheets in other fields is also know, although in the past, many computer applications have been unable to take advantage of the spreadsheet metaphor. One reason for this may be computer applications are often required to exhibit conditional statement execution behavior. However, conditional statement execution behavior is beyond the capability of conventional electronic spreadsheet programs.
In the field of pattern recognition, for example, it is common for a single program to execute one set of instructions during training, and another set of instructions during classification, the instructions for classification being dependent on exemplar data extracted during training. In this field it is also common for programs to dynamically adapt their order of execution based on external control parameters. Consequently, known electronic spreadsheets cannot adequately be used for programming applications in the field of pattern recognition.
In conventional programming, positional order of program statements and conditional branching within program statements drive the order of execution of the program statements. In the BASIC programming language, for example, a program statement at line 20 in a program listing is always executed after the program statement at line 10, unless a branch statement is encountered and a jump instruction is invoked.
Unlike a programming language, an electronic spreadsheet is essentially a means for graphically representing a single expression by distributing the expression across a rectangular grid of cells (or any regular array of cells), each cell being a parenthetical expression that can be a function of some number of other expressions in cells across the grid. As in typical expression evaluation, precedence and dependencies drive the order of execution. Since the order of executing is not explicitly programmed, there is no spreadsheet equivalent to a jump instruction in conventional spreadsheets. The limitation of conventional spreadsheets makes programming certain kinds of behavior difficult, if not impossible.
Conventional electronic spreadsheets are known to support limited conditional behavior, e.g., conditional argument value assignment using the standard IF functions. An IF function consists of three arguments: A, B, and C, where argument A is a logical switch expression, and arguments B and C are the two possible expressions to be evaluated. If the expression in argument A evaluates TRUE, the expression in argument B is evaluated and returned. If the expression in argument A evaluates FALSE, the expression in argument C is evaluated and returned.
Like IF, the CHOOSE function simply evaluates and returns one of N expressions. The evaluation of the expression in the first argument of the CHOOSE function determines which of the N expressions will be evaluated and returned, which is essentially a generalization of the IF function. However, the functions IF, CHOOSE, and similar functions, are only capable of selecting among result values, and are incapable of controlling the order of execution of expressions associated with a cell or a set of cells within the spreadsheet.